public class Test4 {
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();

        mySingleList.addFirst(12);
        mySingleList.addFirst(23);
        mySingleList.addFirst(34);
        mySingleList.addFirst(45);
        mySingleList.display();

//        mySingleList.reverseList();
//        mySingleList.display();

//        MySingleList.ListNone node = mySingleList.middleNode();
//        if(node == null) {
//            System.out.println("链表为空...");
//        } else {
//            System.out.println(node.getVal());
//        }

//    MySingleList.ListNone node = mySingleList.middleNode();
//        if (node != null) {
//            System.out.println("中间节点的值是: " + node.getVal());
//        } else {
//            System.out.println("链表为空");
//        }

        System.out.println(mySingleList.kthToLast(13));
   }
}
